<template>
	<view class="content">
		<text class="success-icon yticon icon-xuanzhong2"></text>
		<text class="tit">支付成功</text>
		
		<view class="btn-group">
			<text @click="showOrders"  open-type="redirect" class="mix-btn">查看订单</text>
			<text @click="index" open-type="redirect" class="mix-btn hollow">返回首页</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type:'',//service,goods,property分别代表商家服务，二手商城，物业
				showOrdersUrl:'',
			}
		},
		onLoad(options) {
			//获取支付成功是来自商家服务，物业还是二手商品
			this.type=options.type
		},
		methods: {
			showOrders(){
				//如果是商家服务，就跳转到商家订单展示页面
				// if(this.type=='service'){
				// 	uni.navigateTo({
				// 		url:'../order/serviceOrder?state=0'
				// 	})
				// }
				//如果是二手商品，就跳转到二手商品订单展示页面
				// if(this.type=='goods'){
					uni.navigateTo({
						url:'../order/order?state=1'
					})
				// }
			},
			index(){
				uni.switchTab({
					url:'../product/list'
				})
			}
		}
	}
</script>

<style lang='scss'>
	.content{
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	.success-icon{
		font-size: 160upx;
		color: #fa436a;
		margin-top: 100upx;
	}
	.tit{
		font-size: 38upx;
		color: #303133;
	}
	.btn-group{
		padding-top: 100upx;
	}
	.mix-btn {
		margin-top: 30upx;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 600upx;
		height: 80upx;
		font-size: $font-lg;
		color: #fff;
		background-color: $base-color;
		border-radius: 10upx;
		&.hollow{
			background: #fff;
			color: #303133;
			border: 1px solid #ccc;
		}
	}
</style>
